package cn.edu.scau.cmi.xiehaizhou.comprehension.cilent;

import java.io.IOException;

import cn.edu.scau.cmi.xiehaizhou.adapter.Cilent;
import cn.edu.scau.cmi.xiehaizhou.cilent.*;
import cn.edu.scau.cmi.xiehaizhou.client.AbstractFactoryCilent;
import cn.edu.scau.cmi.xiehaizhou.client.ChairmanCilent;
import cn.edu.scau.cmi.xiehaizhou.client.FactoryCilent;
import cn.edu.scau.cmi.xiehaizhou.client.MarshalCilent;
import cn.edu.scau.cmi.xiehaizhou.client.SimpleFactoryMethodCilent;
import cn.edu.scau.cmi.xiehaizhou.composite.consistent.ConsistentCilent;
import cn.edu.scau.cmi.xiehaizhou.composite.safe.SafeCompositeCilent;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.stage.Stage;

public class comprehensionCilentController {

    @FXML
    private Button btnSingleton;

    @FXML
    private Button btnClassAdapter;

    @FXML
    private Button btnComSafe;

    @FXML
    private Button btnHibernate;

    @FXML
    private Button btnMul;

    @FXML
    private Button btnComConsistant;

    @FXML
    private Button btnAbstractFactory;

    @FXML
    private Button btnFactory;

    @FXML
    private Button btnSimpleFactory;

    @FXML
    private Button btnAdapter;

    @FXML
    void btnSingleton_Click(ActionEvent event) {
    	new ChairmanCilent().start(new Stage());
    }

    @FXML
    void btnMul_Click(ActionEvent event) {
    	new MarshalCilent().start(new Stage());
    }

    @FXML
    void btnSimpleFactory_Click(ActionEvent event) {
    	new SimpleFactoryMethodCilent().start(new Stage());
    }

    @FXML
    void btnFactory_Click(ActionEvent event) {
    	new FactoryCilent().start(new Stage());
    }

    @FXML
    void btnAbstractFactory_Click(ActionEvent event) {
    	new AbstractFactoryCilent().start(new Stage());
    }

    @FXML
    void btnAdapter_Click(ActionEvent event) throws Exception {
    	new Cilent().start(new Stage());
    }

    @FXML
    void btnComSafe_Click(ActionEvent event) throws IOException {
    	new SafeCompositeCilent().start(new Stage());
    }

    @FXML
    void btnComConsistant_Click(ActionEvent event) throws IOException {
    	new ConsistentCilent().start(new Stage());
    }

    @FXML
    void btnHibernate_Click(ActionEvent event) throws IOException {
    	new HibernateCilent().start(new Stage());
    }

}

